Skip to content

Conversation

@mdegat01
Copy link
Contributor

@mdegat01 mdegat01 commented Aug 29, 2025

Proposed change

Document the API added with home-assistant/supervisor#6140

Type of change

  • Document existing features within Home Assistant
  • Document new or changing features for which there is an existing pull request elsewhere
  • Spelling or grammatical corrections, or rewording for improved clarity
  • Changes to the backend of this documentation
  • Remove stale or deprecated documentation

Checklist

  • I have read and followed the documentation guidelines.
  • I have verified that my changes render correctly in the documentation.

Additional information

Summary by CodeRabbit

  • Documentation
    • Added documentation for a new Store API endpoint: GET /store/addons/{addon}/availability.
    • Details expected responses: 200 on success (installable) and 400 with an explanatory message when not installable.
    • Positioned alongside existing store addon endpoints for easier discovery.
    • No runtime or API signature changes; this is a documentation-only update for API consumers.

@mdegat01 mdegat01 requested a review from agners August 29, 2025 19:22
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 29, 2025

📝 Walkthrough

Walkthrough

Documentation adds a new Store API endpoint, GET /store/addons/<addon>/availability, describing success (200) and non-installable (400 with message) responses. No code or public API signatures changed.

Changes

Cohort / File(s) Summary
Docs — Supervisor Store endpoint
docs/api/supervisor/endpoints.md
Added documentation for GET /store/addons/<addon>/availability: indicates if latest addon version is installable; 200 on success, 400 with explanatory message when not installable; placed under Store addon endpoints.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch add-addon-availability-api

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
docs/api/supervisor/endpoints.md (1)

3236-3243: Clarify response body and semantics; add an example 400 payload.

Per the Supervisor PR/tests, success returns 200 with an empty body, while failures return 400 with a JSON object containing a message (common reasons: unsupported architecture, machine, or minimum Core version). The endpoint also always evaluates the latest store version, even if the add-on is already installed. Consider documenting these explicitly and adding a short error example. (github.com)

 <ApiEndpoint path="/store/addons/<addon>/availability" method="get">
 
-Returns 200 success status if the latest version of the add-on is able to be
-installed on the current system. Returns a 400 error status if it is not with a
-message explaining why.
+Checks whether the latest store version of the add-on can be installed on the current system
+(even if the add-on is already installed).
+
+- Success: 200 OK with an empty response body.
+- Not installable: 400 Bad Request with a JSON payload containing a human-readable message
+  explaining why (e.g., unsupported architecture/machine or Home Assistant version too old).
+
+Example 400 response:
+```json
+{
+  "message": "This add-on requires Home Assistant version 2023.1.1 or greater"
+}
+```
 
 </ApiEndpoint>
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge Base: Disabled due to data retention organization setting

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 36a45df and 671a54e.

📒 Files selected for processing (1)
  • docs/api/supervisor/endpoints.md (1 hunks)

Copy link
Member

@frenck frenck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Approved. Can be merged as soon as the parent PR gets merged.

@mdegat01 mdegat01 merged commit 2845c42 into master Sep 4, 2025
5 checks passed
@mdegat01 mdegat01 deleted the add-addon-availability-api branch September 4, 2025 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants